package com.yjz.jvm.juc.线程.线程算法题1.我的实现;

public class Test {
    /**
     * 要求写两个线程，一个线程将某个对象的某个成员变量的值加1，而另外一个线程将这个成员变量的值减1.使得该变量的值始终处于[0,2].初始值为0.
     * @param args
     */
    public static void main(String[] args) {
        Target t = new Target();
        Thread inCrease = new Thread(new InCrease(t), "inCrease");
        Thread deCrease = new Thread(new Decrease(t), "deCrease");
        inCrease.start();
        deCrease.start();
    }
}
